{	Problem: http://codeforces.ru/problemset/problem/81/A
 	Verdict: Accepted
}
var 
    ls,i:longint;
    s:ansistring;
begin
readln(s);
ls:=length(s)-1;
for i:=ls downto 1 do
    if s[i]=s[i+1] then delete(s,i,2);
write(s);
end.